package com.qinaxiwit.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qianxi.wit.pojo.TbAdvertising;
import com.qianxi.wit.pojo.TbConsult;
import com.qianxi.wit.pojo.TbDoctor;
import com.qinaxiwit.service.TbAdvertisingService;
import com.qinaxiwit.service.TbConsultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zqp
 * @since 2021-01-14
 */
@RestController
public class TbAdvertisingController {
    @Autowired
    private TbAdvertisingService advertisingService;

    @GetMapping("/register/{page}/{size}")
    Page<TbAdvertising> register(@PathVariable("page") int page,
                                 @PathVariable("size") int size){
        try {
            return advertisingService.register(page,size);
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }
    }
}

